package cn.yl.course.server.entity;

import cn.yl.api.server.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 课程
 * </p>
 *
 * @author yl
 * @since 2022-04-22
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("course")
@ApiModel(value = "Course对象", description = "课程")
public class Course extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("课程名")
    @TableField("course_name")
    private String courseName;

    @ApiModelProperty("课程一句话简介")
    @TableField("brief")
    private String brief;

    @ApiModelProperty("原价")
    @TableField("price")
    private Double price;

    @ApiModelProperty("原价标签")
    @TableField("price_tag")
    private String priceTag;

    @ApiModelProperty("优惠价")
    @TableField("discounts")
    private Double discounts;

    @ApiModelProperty("优惠标签")
    @TableField("discounts_tag")
    private String discountsTag;

    @ApiModelProperty("描述markdown")
    @TableField("course_description_mark_down")
    private String courseDescriptionMarkDown;

    @ApiModelProperty("课程描述")
    @TableField("course_description")
    private String courseDescription;

    @ApiModelProperty("课程展示图")
    @TableField("course_img_url")
    private String courseImgUrl;

    @ApiModelProperty("是否新品")
    @TableField("is_new_goods")
    private Boolean newGoods;

    @ApiModelProperty("广告语")
    @TableField("is_new_des")
    private String newDes;

    @ApiModelProperty("最后操作者")
    @TableField("last_operator_id")
    private Integer lastOperatorId;

    @ApiModelProperty("自动上架时间")
    @TableField("auto_online_time")
    private LocalDateTime autoOnlineTime;

    @ApiModelProperty("是否删除")
    @TableField("is_del")
    @TableLogic
    private Boolean del;

    @ApiModelProperty("总时长(分钟)")
    @TableField("total_duration")
    private Integer totalDuration;

    @ApiModelProperty("课程缩略图")
    @TableField("course_list_img")
    private String courseListImg;

    @ApiModelProperty("课程状态，0-草稿，1-上架")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("课程排序，用于后台保存草稿时用到")
    @TableField("sort_num")
    private Integer sortNum;

    @ApiModelProperty("课程预览第一个字段")
    @TableField("preview_first_field")
    private String previewFirstField;

    @ApiModelProperty("课程预览第二个字段")
    @TableField("preview_second_field")
    private String previewSecondField;

    @ApiModelProperty("销量")
    @TableField("sales")
    private Integer sales;

}
